import request from '@/axios';
import {baseUrl} from '@/config/env';


export const list = (data) => {
    return request({
            url: baseUrl + '/sysFormShare/page',
            method: 'get',
            params: data
        }
    )
}
export const add = (data) => {
    return request({
            url: baseUrl + '/sysFormShare/add',
            method: 'post',
            data: data
        }
    )
}

export const getById = (id) => {
    return request({
            url: baseUrl + '/sysFormShare/getById/' + id,
            method: 'get',
        }
    )
}

export const updateById = (data) => {
    return request({
            url: baseUrl + '/sysFormShare/updateById',
            method: 'put',
            data: data
        }
    )
}

export const deleteById = (id) => {
    return request({
            url: baseUrl + '/sysFormShare/deleteById/' + id,
            method: 'delete',
        }
    )
}

export const createShare = (tableId, data) => {
    return request({
            url: baseUrl + '/sysFormShare/createShare/' + tableId,
            method: 'get',
            params: data,
        }
    )
}

